import {
	// useSearchParams,
	useParams,
} from 'react-router-dom'

const Article = () => {
	// 获取 SearchParams 传参
	// const [searchParams] = useSearchParams()
	// const id = searchParams.get('id')
	// const name = searchParams.get('name')

	// 获取 Params 传参
	const { id, name } = useParams()

	return (
		<>
			<h1>Article</h1>
			<hr />
			<p>ID: {id}</p>
			<p>Name: {name}</p>
		</>
	)
}

export default Article
